(x_connection_closed) [USE_X_TOOLKIT]: If
authorGerd Moellmann <gerd@gnu.org>
Mon, 15 Jan 2001 15:28:57 +0000 (15:28 +0000)
committerGerd Moellmann <gerd@gnu.org>
Mon, 15 Jan 2001 15:28:57 +0000 (15:28 +0000)
x_display_info_for_display returns null, don't try to close
the display; we didn't open it.

src/xterm.c

index fadeae0e057208c24d2a3ca6b68e4ea9837405f4..0cd68a7f9e3d7ecaaff782ef3623e3d2da8b64dd 100644 (file)
@@ -11288,7 +11288,10 @@ x_connection_closed (dpy, error_message)
      in OpenWindows.  I don't know how to cicumvent it here.  */
   
 #ifdef USE_X_TOOLKIT
-  XtCloseDisplay (dpy);
+  /* If DPYINFO is null, this means we didn't open the display
+     in the first place, so don't try to close it.  */
+  if (dpyinfo)
+    XtCloseDisplay (dpy);
 #endif
 
   /* Indicate that this display is dead.  */